package com.zhong.quartz.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.zhong.common.annotation.Excel;
import com.zhong.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * 定时任务调度日志表 sys_job_log
 *
 * @author zhongzc
 */
@Data
@TableName("sys_job_log")
@Table(comment = "定时任务调度日志表", name = "sys_job_log", isSimple = true)
public class SysJobLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 任务名称 */
    @Excel(name = "任务名称")
    @Column(comment = "任务名称")
    private String jobName;

    /** 任务组名 */
    @Excel(name = "任务组名")
    @Column(comment = "任务组名")
    private String jobGroup;

    /** 调用目标字符串 */
    @Excel(name = "调用目标字符串")
    @Column(comment = "调用目标字符串")
    private String invokeTarget;

    /** 日志信息 */
    @Excel(name = "日志信息")
    @Column(comment = "日志信息")
    private String jobMessage;

    /** 执行状态（0正常 1失败） */
    @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败")
    @Column(comment = "执行状态（0正常 1失败）",type = MySqlTypeConstant.CHAR)
    private String status;

    /** 异常信息 */
    @Excel(name = "异常信息")
    @Column(comment = "异常信息",type = MySqlTypeConstant.TEXT)
    private String exceptionInfo;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(comment = "开始时间",type = MySqlTypeConstant.DATETIME)
    private Date startTime;

    /** 停止时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(comment = "停止时间",type = MySqlTypeConstant.DATETIME)
    private Date stopTime;
}
